#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class VoteRecord : Business.BusinessBase<VoteRecord, int>
	{
		#region Fields and Properties

		private String additional = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Additional
		{
			get { return additional; }
			set
			{
				if (value != additional)
				{
					MarkChanged("Additional");
					additional = value;
				}
			}
		}

		private DateTime voteTime = DateTime.MinValue;
		/// <summary>
		/// 
		/// </summary>
		public DateTime VoteTime
		{
			get { return voteTime; }
			set
			{
				if (value != voteTime)
				{
					MarkChanged("VoteTime");
					voteTime = value;
				}
			}
		}

		private String iP = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String IP
		{
			get { return iP; }
			set
			{
				if (value != iP)
				{
					MarkChanged("IP");
					iP = value;
				}
			}
		}

		private int userID = 0;
		/// <summary>
		/// 
		/// </summary>
		public int UserID
		{
			get { return userID; }
			set
			{
				if (value != userID)
				{
					MarkChanged("UserID");
					userID = value;
				}
			}
		}

		private int voteRecordID = 0;
		/// <summary>
		/// 
		/// </summary>
		public int VoteRecordID
		{
			get { return voteRecordID; }
			set
			{
				if (value != voteRecordID)
				{
					MarkChanged("VoteRecordID");
					voteRecordID = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public VoteRecord()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override VoteRecord DataSelect(int id)
		{
			return Services.DALService.VoteRecordService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.VoteRecordService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.VoteRecordService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.VoteRecordService.Delete(this);
		}

		#endregion Base overrides
	}
}
